package com.swak.annotation;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 事务的传播
 * 
 * @author lifeng
 * @date 2021年2月5日 上午9:30:22
 */
@RequiredArgsConstructor
@Getter
public enum Propagation {

	/**
	 * Support a current transaction, create a new one if none exists.
	 */
	REQUIRED(0),

	/**
	 * Support a current transaction, throw an exception if none exists.
	 */
	MANDATORY(1),

	/**
	 * Create a new transaction, and suspend the current transaction if one exists.
	 */
	REQUIRES_NEW(2);

	private final int value;

}
